/**
 * Created by yang on 14/12/9.
 */

var core = module.exports = {};
var modules = {};
var db = require('./db');
process.core = core;


core.init = function(callback){
    var log = require('./log');
    core.log = log;
    db.loadModels(function(){
        core.db = db;
        callback();
    });
}

core.getProjectRoot = function(){
    var path = require('path');
    return path.join(__dirname,'../../../');
}

core.config = require('../config');

core.utils = require('./utils/index');

core.Server = require('./Server');

core.DSL = require('./DSL');